﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Knetlik.Models.Session>>" %>
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="Knetlik.Models"%>

<asp:Content ID="sessionsContent" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function toggleItem(ctr) {
            var item = $('#' + ctr.id);
            var isGrid = item.hasClass('gridItem');

            item.toggleClass(isGrid ? 'gridItem_on' : 'gridItem_v_on');
        }
        
        function toggleMode(mode) {
            var gridToggle = $(".topic .g");
            var listToggle = $(".topic .l");

            if (mode == 'list') {
                gridToggle.removeClass('grid_on').addClass('gridview');
                listToggle.removeClass('listview').addClass('list_on');
                $('#grid .gridItem').removeClass('gridItem').addClass('gridItem_v');
            }
            else if (mode == 'grid') {
                gridToggle.removeClass('gridview').addClass('grid_on');
                listToggle.removeClass('list_on').addClass('listview');
                $('#grid .gridItem_v').removeClass('gridItem_v').addClass('gridItem');
            }
        }
    </script>
    <div class="about">
        <p>
      On <span class="emphasis">February 13, 2010</span> in Microsoft premises  
      at <a target=”_blank” href="http://maps.google.com/maps?source=s_q&hl=ru&geocode=&q=Vysko%C4%8Dilova+1461%2F2a&sll=37.0625,-95.677068&sspn=37.136668,79.013672&ie=UTF8&hq=Vysko%C4%8Dilova+1461%2F2a&radius=15000.000000&split=1&hnear=&t=h&layer=c&cbll=50.047886,14.454291&panoid=DwCI7JQisiusxD-7nU1MQw&cbp=11,210.92,,0,5&ll=50.047885,14.45429&spn=0.000396,0.002411&z=19">Vyskočilova 1461/2a, Praha 4</a> 
      there will be a series of ongoing short presentations about .NET.
        </p>
        <p>
      Each of the talks lasts <span class="emphasis">10 minutes</span> only (plus 5 minutes for questions) so 
      you will get more diverse ideas in less time. Languages of the conference - Czech and English. 
        </p>  
        <p>
      The general motto this time is "<span class="emphasis">Bringing Good Software Architecture</span>" and 
      you will hear skilled software professionals and Microsoft MVPs talking about different aspects of this 
      complicated and varied subject.
        </p>  
        <p>
      The conference starts at 10:00 and will finish in <span class="emphasis">3 hours</span>.
        </p>  
    </div>        
    <div class="sessions round">
        <div id="grid" class="grid">
            <div class="topic">
                <h2>Sessions</h2>
                <div class="display">
                    <div id="gridTopic_grid" class="g grid_on" onclick="toggleMode('grid')"></div>
                    <div id="gridTopic_list" class="l listview" onclick="toggleMode('list')"></div>
                </div>
            </div>  
            
                 
            <%
               var list = new List<Session>(Model);
               for( int i = 0; i < list.Count; i++)
               { %>
               <div id="p_<%= i+1 %>" class="gridItem" onmouseover="toggleItem(this);" onmouseout="toggleItem(this);">
                    <div class="frame">
                        <img src="<%= "../../Content/images/speakers/" + list[i].Speaker.Photo %>" />
                    </div>
                    <div class="content">
                        <div class="speaker"><%= list[i].Speaker.Name %></div>
                        <div class="talk">
							<span class="time"><%= list[i].Time %></span>
							<%= list[i].Topic %>
                        </div>
                        <div class="abstract"><%= list[i].Description %></div>
                    </div>
                </div>
            <% } %>
        </div>
    </div>        
</asp:Content>

